package com.fuze.domain.vo;

import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size;
import java.io.Serializable;

/**
 * @author sepc_
 * @date 4/7/2021 16:03
 */
@ApiModel(value = "LoginFormVO", description = "登录的表单数据的JSON对象")
@Data
@NoArgsConstructor
@AllArgsConstructor
public class LoginFormVO implements Serializable {
    private static final long serialVersionUID = -513062613820911110L;

    /**
     * 登录的用户名
     */
    @ApiModelProperty(name = "username", example = "admin",allowableValues = "String", required = true)
    @Size(min = 5, max = 20, message = "5~20之间！")
    @NotBlank(message = "登录用户名不能为空！")
    @JsonProperty(value = "username")
    private String username;

    /**
     * 登录的密码
     */
    @ApiModelProperty(name = "password", example = "fuze-energy.com",allowableValues = "String" ,required = true)
    @Size(min = 5, max = 20, message = "登录密码长度在5~20之间！")
    @NotBlank(message = "登录密码不能为空")
    @JsonProperty(value = "password")
    private String password;

    /**
     * 登录用户的标识
     */
    @ApiModelProperty(name = "loginFlag", example = "1", allowableValues = "1,2",required = true)
    @JsonProperty(value = "loginFlag")
    private Integer loginFlag;

}
